<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta charset="utf-8">
<link rel="icon" href="https://static.jianshukeji.com/highcharts/images/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1">
	<script src="https://img.hcharts.cn/jquery/jquery-1.8.3.min.js"></script>
	<script src="https://img.hcharts.cn/highcharts/highcharts.js"></script>
	<script src="https://img.hcharts.cn/highcharts/modules/exporting.js"></script>
	<script src="https://img.hcharts.cn/highcharts-plugins/highcharts-zh_CN.js"></script>
    
    <script type="text/javascript">
    window.onload = function(){
    var h3= document.getElementById("title");
    var str = unescape("adb -s 192.168.56.101:5555 shell monkey -s 20 -p com.luojilab.player --hprof --throttle 500 --ignore-crashes --ignore-timeouts --ignore-security-exceptions --ignore-native-crashes --monitor-native-crashes --pct-syskeys 10 -v -v -v 100000  2\u003eMonkeyLog/MonkeyError_20180827232706.log 1\u003eMonkeyLog/MonkeyInfo_20180827232706.log")
    h3.innerHTML = str ;
    };  
    </script>
</head>
<body>
<!--
*************************************************************************
   Generated by HCODE at 2018-03-25 15:15:37
   From: https://code.hcharts.cn/demos/hhhhx1
*************************************************************************
 -->

    <h3>得到Android性能报告:</h3>
	<hr>
    <h3 id="title"></h3>
	<hr>
	<div id="cpuchart" style="min-width:400px;height:400px"></div>
    <div id="memchart"></div>
	<div id="netchart"></div>
    <div id="fpschart"></div>

	<script>
	var chart = null;

	var memtime = ["2018-08-27 23:27:14", "2018-08-27 23:27:45", "2018-08-27 23:28:16"]
	var meminfo = ["25721", "32304", "32124"]
	var memactivity = ["com.luojilab.business.ddplayer.player.LuoJiLabPlayerActivity", "com.luojilab.business.web.ArticleProxyActivity", "com.luojilab.component.web.reply.ArticleCommentReply"]
	var data= [["2018-08-27 23:27:14", 25721], ["2018-08-27 23:27:45", 32304], ["2018-08-27 23:28:16", 32124]]
	//内存数据

	var cputime = ["2018-08-27 23:27:14", "2018-08-27 23:27:45", "2018-08-27 23:28:16"]
	var cpuinfo = ["0", "0", "0"]
	var cpuactivity = ["com.luojilab.business.ddplayer.player.LuoJiLabPlayerActivity", "com.luojilab.business.web.ArticleProxyActivity", "com.luojilab.component.web.reply.ArticleCommentReply"]
	var data1= [["2018-08-27 23:27:14", 0.0], ["2018-08-27 23:27:45", 0.0], ["2018-08-27 23:28:16", 0.0]]
	//cpu数据

	var nettime = ["2018-08-27 23:27:14", "2018-08-27 23:27:45", "2018-08-27 23:28:16"]
	var netinfo = ["587", "713", "818"]
	var netactivity = ["com.luojilab.business.ddplayer.player.LuoJiLabPlayerActivity", "com.luojilab.business.web.ArticleProxyActivity", "com.luojilab.component.web.reply.ArticleCommentReply"]
	var data2= [["2018-08-27 23:27:14", 587.0], ["2018-08-27 23:27:45", 713.0], ["2018-08-27 23:28:16", 818.0]]
	//流量数据


	var fpstime = ["2018-08-27 23:27:14", "2018-08-27 23:27:45", "2018-08-27 23:28:16"]
	var fpsinfo = ["60", "60", "60"]
	var fpsactivity = ["com.luojilab.business.ddplayer.player.LuoJiLabPlayerActivity", "com.luojilab.business.web.ArticleProxyActivity", "com.luojilab.component.web.reply.ArticleCommentReply"]
	var data3= [["2018-08-27 23:27:14", 60.0], ["2018-08-27 23:27:45", 60.0], ["2018-08-27 23:28:16", 60.0]]
	//流量数据





	//自己编写的js方法
	function getActivity(yInfo, mInfo, info){
		var i = yInfo.indexOf(info);
		return mInfo[i];
	}



	$(function () {
    	$('#memchart').highcharts({
	        chart: {
	            zoomType: 'x'
	        },
	        title: {
	            text: '内存使用率'
	        },
	        xAxis: {
	            type: 'datetime',
	            crosshair: true,
	            type: "datetime",
	            categories: memtime	
	        },
	        tooltip: {
	            dateTimeLabelFormats: {
	                millisecond: '%H:%M:%S.%L',
	                second: '%H:%M:%S',
	                minute: '%H:%M',
	                hour: '%H:%M',
	                day: '%Y-%m-%d',
	                week: '%m-%d',
	                month: '%Y-%m',
	                year: '%Y'
	            },formatter: function () {
	            			var mInfo = ["com.luojilab.business.ddplayer.player.LuoJiLabPlayerActivity", "com.luojilab.business.web.ArticleProxyActivity", "com.luojilab.component.web.reply.ArticleCommentReply"];
		                	var yInfo = ["2018-08-27 23:27:14", "2018-08-27 23:27:45", "2018-08-27 23:28:16"];
		                	var point = this.points[0];
							return '<b>' + "内存: </b>" + point.y + '<br/>' +
								   '<b>' + "Time: </b>" + point.x + '<br/>' +
								   '<b>' + "Activity: </b>" + getActivity(yInfo, mInfo, point.x) ;
	            },
	            shared: true   		

	        },
	        yAxis: {
	            title: {
	                text: 'kB'
	            }
	        },
	        legend: {
	            enabled: false
	        },
	        plotOptions: {
	            area: {
	                fillColor: {
	                    linearGradient: {
	                        x1: 0,
	                        y1: 0,
	                        x2: 0,
	                        y2: 1
	                    },
	                    stops: [
	                        [0, Highcharts.getOptions().colors[0]],
	                        [1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')]
	                    ]
	                },
	                marker: {
	                    radius: 2
	                },
	                lineWidth: 1,
	                states: {
	                    hover: {
	                        lineWidth: 1
	                    }
	                },
	                threshold: null
	            }
	        },
	        series: [{
	            type: 'area',
	            name: '内存使用率',
	            data: data
	        }]
	    });


    $('#cpuchart').highcharts({
        chart: {
            zoomType: 'x'
        },
        title: {
            text: 'CPU使用率'
        },
        xAxis: {
            type: 'datetime',
            crosshair: true,
            type: "datetime",
            categories: cputime	
        },
        tooltip: {
            dateTimeLabelFormats: {
                millisecond: '%H:%M:%S.%L',
                second: '%H:%M:%S',
                minute: '%H:%M',
                hour: '%H:%M',
                day: '%Y-%m-%d',
                week: '%m-%d',
                month: '%Y-%m',
                year: '%Y'
            },formatter: function () {
            			var mInfo = ["com.luojilab.business.ddplayer.player.LuoJiLabPlayerActivity", "com.luojilab.business.web.ArticleProxyActivity", "com.luojilab.component.web.reply.ArticleCommentReply"];
	                	var yInfo = ["2018-08-27 23:27:14", "2018-08-27 23:27:45", "2018-08-27 23:28:16"];
	                	var point = this.points[0];
						return '<b>' + "CPU: </b>" + point.y + '<br/>' +
							   '<b>' + "Time: </b>" + point.x + '<br/>' +
							   '<b>' + "Activity: </b>" + getActivity(yInfo, mInfo, point.x) ;
            },
            shared: true   		

        },
        yAxis: {
            title: {
                text: '%'
            }
        },
        legend: {
            enabled: false
        },
        plotOptions: {
            area: {
                fillColor: {
                    linearGradient: {
                        x1: 0,
                        y1: 0,
                        x2: 0,
                        y2: 1
                    },
                    stops: [
                        [0, Highcharts.getOptions().colors[0]],
                        [1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')]
                    ]
                },
                marker: {
                    radius: 2
                },
                lineWidth: 1,
                states: {
                    hover: {
                        lineWidth: 1
                    }
                },
                threshold: null
            }
        },
        series: [{
            type: 'area',
            name: 'CPU使用率',
            data: data1		
	        }]
    	});



    $('#netchart').highcharts({
        chart: {
            zoomType: 'x'
        },
        title: {
            text: '流量'
        },
        xAxis: {
            type: 'datetime',
            crosshair: true,
            type: "datetime",
            categories: nettime
        },
        tooltip: {
            dateTimeLabelFormats: {
                millisecond: '%H:%M:%S.%L',
                second: '%H:%M:%S',
                minute: '%H:%M',
                hour: '%H:%M',
                day: '%Y-%m-%d',
                week: '%m-%d',
                month: '%Y-%m',
                year: '%Y'
            },formatter: function () {
            			var mInfo = ["com.luojilab.business.ddplayer.player.LuoJiLabPlayerActivity", "com.luojilab.business.web.ArticleProxyActivity", "com.luojilab.component.web.reply.ArticleCommentReply"];
	                	var yInfo = ["2018-08-27 23:27:14", "2018-08-27 23:27:45", "2018-08-27 23:28:16"];
	                	var point = this.points[0];
						return '<b>' + "流量: </b>" + point.y + '<br/>' +
							   '<b>' + "Time: </b>" + point.x + '<br/>' +
							   '<b>' + "Activity: </b>" + getActivity(yInfo, mInfo, point.x) ;
            },
            shared: true

        },
        yAxis: {
            title: {
                text: 'M'
            }
        },
        legend: {
            enabled: false
        },
        plotOptions: {
            area: {
                fillColor: {
                    linearGradient: {
                        x1: 0,
                        y1: 0,
                        x2: 0,
                        y2: 1
                    },
                    stops: [
                        [0, Highcharts.getOptions().colors[0]],
                        [1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')]
                    ]
                },
                marker: {
                    radius: 2
                },
                lineWidth: 1,
                states: {
                    hover: {
                        lineWidth: 1
                    }
                },
                threshold: null
            }
        },
        series: [{
            type: 'area',
            name: '流量',
            data: data2
	        }]
    	});





    });


	$('#fpschart').highcharts({
        chart: {
            zoomType: 'x'
        },
        title: {
            text: 'fps'
        },
        xAxis: {
            type: 'datetime',
            crosshair: true,
            type: "datetime",
            categories: nettime
        },
        tooltip: {
            dateTimeLabelFormats: {
                millisecond: '%H:%M:%S.%L',
                second: '%H:%M:%S',
                minute: '%H:%M',
                hour: '%H:%M',
                day: '%Y-%m-%d',
                week: '%m-%d',
                month: '%Y-%m',
                year: '%Y'
            },formatter: function () {
            			var mInfo = ["com.luojilab.business.ddplayer.player.LuoJiLabPlayerActivity", "com.luojilab.business.web.ArticleProxyActivity", "com.luojilab.component.web.reply.ArticleCommentReply"];
	                	var yInfo = ["2018-08-27 23:27:14", "2018-08-27 23:27:45", "2018-08-27 23:28:16"];
	                	var point = this.points[0];
						return '<b>' + "fps: </b>" + point.y + '<br/>' +
							   '<b>' + "Time: </b>" + point.x + '<br/>' +
							   '<b>' + "Activity: </b>" + getActivity(yInfo, mInfo, point.x) ;
            },
            shared: true

        },
        yAxis: {
            title: {
                text: '帧'
            }
        },
        legend: {
            enabled: false
        },
        plotOptions: {
            area: {
                fillColor: {
                    linearGradient: {
                        x1: 0,
                        y1: 0,
                        x2: 0,
                        y2: 1
                    },
                    stops: [
                        [0, Highcharts.getOptions().colors[0]],
                        [1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')]
                    ]
                },
                marker: {
                    radius: 2
                },
                lineWidth: 1,
                states: {
                    hover: {
                        lineWidth: 1
                    }
                },
                threshold: null
            }
        },
        series: [{
            type: 'area',
            name: 'FPS(每秒帧数)',
            data: data3
	        }]






    });




	</script>
</body>
</html>